<template>
	<router-view @change="changeActive"></router-view>
	<van-tabbar v-model="active">
	 <!-- <van-tabbar-item icon="home-o" to="/home">首页</van-tabbar-item> -->
	  <van-tabbar-item icon="home-o" :to="{'name':'home'}">首页</van-tabbar-item>
	  <van-tabbar-item icon="logistics" :to="{'name':'buy'}">购车</van-tabbar-item>
	  <van-tabbar-item icon="after-sale" :to="{'name':'sell'}">卖车</van-tabbar-item>
	  <van-tabbar-item icon="friends-o" :to="{'name':'friends'}">车友圈</van-tabbar-item>
	  <van-tabbar-item icon="user-circle-o" :to="{'name':'usercenter'}">我的</van-tabbar-item>
	</van-tabbar>
</template>

<script setup>
	import { ref } from 'vue';
	const active = ref(0);
	function changeActive(data){
		active.value = data
	}
</script>

<style>
</style>